﻿using System;
using Crowler.Model.CoreComponents;

namespace CoreComponents
{
    public class AppEnvironment : IAppEnvironment
    {
        private static readonly IResolver Resolver = new Resolver();
        public Guid AppId { get; private set; }

        public AppEnvironment()
        {
            AppId = new Guid();
        }

        public static IResolver GetResolver()
        {
            return Resolver;
        }

        public T Resolve<T>(string name)
        {
            return Resolver.Get<T>(name);
        }

        public T Resolve<T>()
        {
            return Resolver.Get<T>();
        }
    }
}
